package aip.core.model.todo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "AIP_TODO")
public class Todo implements Serializable
{

    private static final long serialVersionUID = -2150599770992652445L;

    public static final String STATE_CONS_TOASSIGN = "待分配";
    public static final String STATE_CONS_TOREPLY = "待回复";
    public static final String STATE_CONS_REASSIGN = "重新分配";
    public static final String STATE_CONS_DONE = "完成";

    public Todo()
    {
        super();
    }

    public Todo(String actor, String title, String state)
    {
        super();
        this.actor = actor;
        this.title = title;
        this.state = state;
    }

    /** ID */
    private int id;
    /** 关联对象 */
    private int domain;
    /** 待办状态 */
    private String state;
    /** 执行人 */
    private String actor;
    /** 步骤标题 */
    private String title;
    /** 创建时间 */
    private Date create;
    /** 完成时间 */
    private Date done;
    /** 备注 */
    private String comment;

    /**
     * @return the id
     */
    @Id
    @Column(name = "ID_")
    public int getId()
    {
        return id;
    }

    /**
     * @param id
     *        the id to set
     */
    public void setId(int id)
    {
        this.id = id;
    }

    /**
     * @return the domain
     */
    @Column(name = "DOMAIN_")
    public int getDomain()
    {
        return domain;
    }

    /**
     * @param domain
     *        the domain to set
     */
    public void setDomain(int domain)
    {
        this.domain = domain;
    }

    /**
     * @return the state
     */
    @Column(name = "STATE_")
    public String getState()
    {
        return state;
    }

    /**
     * @param state
     *        the state to set
     */
    public void setState(String state)
    {
        this.state = state;
    }

    /**
     * @return the actor
     */
    @Column(name = "ACTOR_")
    public String getActor()
    {
        return actor;
    }

    /**
     * @param actor
     *        the actor to set
     */
    public void setActor(String actor)
    {
        this.actor = actor;
    }

    /**
     * @return the title
     */
    @Column(name = "TITLE_")
    public String getTitle()
    {
        return title;
    }

    /**
     * @param title
     *        the title to set
     */
    public void setTitle(String title)
    {
        this.title = title;
    }

    /**
     * @return the create
     */
    @Column(name = "CREATE_")
    public Date getCreate()
    {
        return create;
    }

    /**
     * @param create
     *        the create to set
     */
    public void setCreate(Date create)
    {
        this.create = create;
    }

    /**
     * @return the done
     */
    @Column(name = "DONE_")
    public Date getDone()
    {
        return done;
    }

    /**
     * @param done
     *        the done to set
     */
    public void setDone(Date done)
    {
        this.done = done;
    }

    /**
     * @return the comment
     */
    @Column(name = "COMMENT_")
    public String getComment()
    {
        return comment;
    }

    /**
     * @param comment
     *        the comment to set
     */
    public void setComment(String comment)
    {
        this.comment = comment;
    }

}
